using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region DealInfo

	/// <summary>
	/// DealInfo object for NHibernate mapped table 'DealInfo'.
	/// </summary>
	public class DealInfo
	{
		#region Member Variables
		
		protected int _id;
		protected string _orderId;
		protected int _userId;
		protected string _userName;
		protected decimal _totalPrice;
		protected DateTime _addDate;
		protected DateTime _endDate;
		protected int _type;
		protected string _typeCon;
		protected int _state;

		#endregion

		#region Constructors

		public DealInfo() { }

		public DealInfo( string orderId, int userId, string userName, decimal totalPrice, DateTime addDate, DateTime endDate, int type, string typeCon, int state )
		{
			this._orderId = orderId;
			this._userId = userId;
			this._userName = userName;
			this._totalPrice = totalPrice;
			this._addDate = addDate;
			this._endDate = endDate;
			this._type = type;
			this._typeCon = typeCon;
			this._state = state;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual string OrderId
		{
			get { return _orderId; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for OrderId", value, value.ToString());
				_orderId = value;
			}
		}

		public  virtual int UserId
		{
			get { return _userId; }
			set { _userId = value; }
		}

		public  virtual string UserName
		{
			get { return _userName; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for UserName", value, value.ToString());
				_userName = value;
			}
		}

		public  virtual decimal TotalPrice
		{
			get { return _totalPrice; }
			set { _totalPrice = value; }
		}

		public  virtual DateTime AddDate
		{
			get { return _addDate; }
			set { _addDate = value; }
		}

		public  virtual DateTime EndDate
		{
			get { return _endDate; }
			set { _endDate = value; }
		}

		public  virtual int Type
		{
			get { return _type; }
			set { _type = value; }
		}

		public  virtual string TypeCon
		{
			get { return _typeCon; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for TypeCon", value, value.ToString());
				_typeCon = value;
			}
		}

		public  virtual int State
		{
			get { return _state; }
			set { _state = value; }
		}

		

		#endregion
	}
	#endregion
}